package com.yang.gulioss.controller;

import com.yang.gulioss.service.Impl.OssServiceImpl;
import com.yang.gulioss.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

@RestController
@RequestMapping("SpringCloudAlibabaOss")
public class OssController {

    @Autowired
    private OssServiceImpl ossService;

    @PostMapping("upLoadOssFile")
    public R upLoadOssFile(MultipartFile file){
        String uplotdfile = ossService.uplotdfile(file);
        return R.ok().data("uplotdfile",uplotdfile);
    }

}
